package org.example.zrccddllljh.Mapper;

import org.apache.ibatis.annotations.*;
import org.example.zrccddllljh.Pojo.Announcement;

import java.util.List;

@Mapper
public interface AnnouncementMapper {
    
    @Select("select * from announcement;")
    List<Announcement> list();

    @Insert("insert into announcement(title,content,admin_id,create_time,update_time) " +
            "values(#{title},#{content},#{adminid},#{createTime},#{updateTime})")
    void add(Announcement announcement);
@Update("update announcement set title =#{title},content=#{content}  where id=#{id};")
    void upadte(Announcement announcement);

    @Delete("delete from announcement where id=#{id};")
    void deleteById(Integer id);
}
